package com.example.statemachine;

import lombok.extern.slf4j.Slf4j;

import org.springframework.statemachine.listener.StateMachineListenerAdapter;
import org.springframework.statemachine.state.State;

@Slf4j
public class StateMachineListener extends StateMachineListenerAdapter<StatesEvents.State, StatesEvents.Event> {

    @Override
    public void stateChanged(State<StatesEvents.State, StatesEvents.Event> from, State<StatesEvents.State, StatesEvents.Event> to) {
        log.info("State changed to {} ", to.getId());
    }
}
